export const categoryOption = [
  {
    value: '2',
    label: '软件开发',
    icon: 'ri-code-s-slash-line'
  },
  {
    value: '9',
    label: '硬件开发',
    icon: 'ri-remote-control-line'
  },
  {
    value: '5',
    label: 'UI设计',
    icon: 'ri-shapes-line'
  },
  {
    value: '6',
    label: '人工智能',
    icon: 'ri-robot-2-line'
  },
  {
    value: '7',
    label: '开发工具',
    icon: 'ri-hammer-line'
  },
  {
    value: '8',
    label: '数学',
    icon: 'ri-formula'
  },
  {
    value: '1',
    label: '生活分享',
    icon: 'ri-body-scan-line'
  },
  {
    value: '3',
    label: '游戏',
    icon: 'ri-discord-line'
  },
  {
    value: '4',
    label: '旅游攻略',
    icon: 'ri-rocket-2-line'
  }
]

export const tagOptions = [
  { label: '前端', value: 'qd', pid: '2' },
  { label: '服务端', value: 'fwd', pid: '2' },
  { label: 'Android', value: 'android', pid: '2' },
  { label: 'IOS', value: 'ios', pid: '2' },
  { label: '人工智能', value: 'rgzn', pid: '2' },
  { label: '数据库', value: 'sjk', pid: '2' },
  { label: 'Mysql', value: 'Mysql', pid: '2' },
  { label: 'MongoDb', value: 'MongoDb', pid: '2' },
  { label: 'Redis', value: 'Redis', pid: '2' },
  { label: 'Node', value: 'Node', pid: '2' },
  { label: 'JavaScript', value: 'js', pid: '2' },
  { label: 'TypeScript', value: 'ts', pid: '2' },
  { label: 'Git', value: 'git', pid: '2' },
  { label: 'GitHub', value: 'github', pid: '2' },
  { label: 'Docker', value: 'Docker', pid: '2' },
  { label: '单点登录', value: 'dddl', pid: '2' },
  { label: 'npm', value: 'npm', pid: '2' },
  { label: '面试', value: 'ms', pid: '2' },
  { label: 'CSS', value: 'css', pid: '2' },
  { label: 'HTML', value: 'html', pid: '2' },
  { label: 'Vue.js', value: 'vue', pid: '2' },
  { label: 'Nuxt.js', value: 'nuxt', pid: '2' },
  { label: 'Nginx', value: 'nginx', pid: '2' },
  { label: 'React.js', value: 'react', pid: '2' },
  { label: 'Jquery', value: 'jquery', pid: '2' },
  { label: 'D3.js', value: 'D3.js', pid: '2' },
  { label: '可视化', value: 'ksh', pid: '2' },
  { label: 'Java', value: 'java', pid: '2' },
  { label: 'Spring', value: 'Spring', pid: '2' },
  { label: 'SpringCloud', value: 'SpringCloud', pid: '2' },
  { label: 'Webpack', value: 'Webpack', pid: '2' },
  { label: 'SVG', value: 'Svg', pid: '2' },
  { label: '代码规范', value: 'dmgf', pid: '2' },
  { label: 'Linux', value: 'linux', pid: '2' },
  { label: '驱动开发', value: 'qdkf', pid: '9' },
  { label: '硬件工程', value: 'yjgc', pid: '9' },
  { label: 'ARM开发', value: 'arm', pid: '9' },
  { label: 'FPGA开发', value: 'fpga', pid: '9' },
  { label: '单片机', value: 'dpj', pid: '9' },
  { label: '厨艺', value: 'chuyi', pid: '1' },
  { label: '阅读', value: 'yuedu', pid: '1' },
  { label: '心态', value: 'xintai', pid: '1' },
  { label: 'LOL', value: 'lol', pid: '3' },
  { label: '英雄联盟', value: 'lol1', pid: '3' },
  { label: '王者荣耀', value: 'wzry', pid: '3' },
  { label: 'DNF', value: 'dnf', pid: '3' },
  { label: '网游', value: 'wangyou', pid: '3' },
  { label: '手游', value: 'shouyou', pid: '3' },
  { label: '旅行', value: 'lvxing', pid: '4' },
  { label: '攻略', value: 'gonglue', pid: '4' },
  { label: '3D', value: '3d', pid: '5' },
  { label: '交互', value: 'jiaohu', pid: '5' },
  { label: '设计', value: 'sheji', pid: '5' },
  { label: '字体', value: 'font', pid: '5' },
  { label: 'Python', value: 'Python', pid: '6' },
  { label: '算法', value: 'suanfa', pid: '6' },
  { label: 'GPT', value: 'GPT', pid: '6' },
  { label: 'AI', value: 'AI', pid: '6' },
  { label: 'jenkins', value: 'jenkins', pid: '7' },
  { label: 'idea', value: 'idea', pid: '7' },
  { label: 'vscode', value: 'vscode', pid: '7' },
  { label: 'docker', value: 'docker', pid: '7' },
  { label: 'postman', value: 'postman', pid: '7' },
  { label: '线性代数', value: 'xxds', pid: '8' },
  { label: '矩阵', value: 'juzhen', pid: '8' },
  { label: '概率论', value: 'gailvlun', pid: '8' },
  { label: '图论', value: 'tulun', pid: '8' },
  { label: '动态规划', value: 'dtgh', pid: '8' },
  { label: '几何学', value: 'jhx', pid: '8' }
]

export const colors = [
  '#5c2223',
  '#eea2a4',
  '#ee3f4d',
  '#1772b4',
  '#2bae85',
  '#1a6840',
  '#66c18c',
  '#fcc515',
  '#fb8b05',
  '#ef632b',
  '#d42517',
  '#d2357d',
  '#22a2c3',
  '#ec2c64',
  '#0f59a4',
  '#c3d7df'
]

export const getRandomColor = () => {
  return colors[Math.floor(Math.random() * colors.length)]
}

export const categoryMap = categoryOption.reduce((prev, cur) => {
  prev[cur.value] = cur.label
  return prev
}, {})

export const tagMap = tagOptions.reduce((prev, cur) => {
  prev[cur.value] = cur.label
  return prev
}, {})

export const userCategoryTabs = [
  { label: '动态', url: '', exact: true },
  { label: '文章', url: '/article' },
  { label: '友圈', url: '/circle' },
  { label: '收藏', url: '/collect' },
  { label: '关注', url: '/focus' },
  { label: '点赞', url: '/agree' },
  { label: '文件夹', url: '/folder' },
  { label: '标签集', url: '/tags' }
]

export const notifyClassifyOptions = [
  {
    url: '/notification',
    name: '评论消息',
    key: 'commentCount',
    exact: true
  },
  {
    url: '/notification/agree',
    name: '点赞消息',
    key: 'agreeCount'
  },
  {
    url: '/notification/focus',
    name: '关注消息',
    key: 'focusCount'
  },
  {
    url: '/notification/collect',
    name: '收藏消息',
    key: 'collectCount'
  },
  {
    url: '/notification/im',
    name: '私信',
    key: 'imCount'
  },
  {
    url: '/notification/notice',
    name: '系统消息',
    key: 'noticeCount'
  }
]

export const noticeMap = {
  1: {
    type: '点赞',
    to: '/notification/agree',
    key: 'agreeCount'
  },
  2: {
    type: '收藏',
    to: '/notification/collect',
    key: 'collectCount'
  },
  3: {
    type: '关注',
    to: '/notification/focus',
    key: 'focusCount'
  },
  4: {
    type: '评论',
    to: '/notification',
    key: 'commentCount'
  },
  5: {
    type: '系统消息',
    to: '/notification/notice',
    key: 'noticeCount'
  }
}

export const mavonEditorToolbars = {
  header: true, // 标题
  bold: true, // 粗体
  italic: true, // 斜体
  underline: true, // 下划线
  strikethrough: true, // 中划线
  mark: true, // 标记
  superscript: true, // 上角标
  subscript: true, // 下角标
  quote: true, // 引用
  ol: true, // 有序列表
  ul: true, // 无序列表
  link: true, // 链接
  imagelink: true, // 图片链接
  code: true, // code
  table: true, // 表格
  task: true,
  function: true,
  fullscreen: true, // 全屏编辑
  readmodel: true, // 沉浸式阅读
  htmlcode: true, // 展示html源码
  help: true, // 帮助
  /* 1.3.5 */
  undo: true, // 上一步
  redo: true, // 下一步
  trash: true, // 清空
  save: false, // 保存（触发events中的save事件）
  /* 1.4.2 */
  navigation: true, // 导航目录
  /* 2.1.8 */
  alignleft: true, // 左对齐
  aligncenter: true, // 居中
  alignright: true, // 右对齐
  /* 2.2.1 */
  subfield: true, // 单双栏模式
  preview: true // 预览
}

export const codeStyleList = [
  'agate',
  'androidstudio',
  'arduino-light',
  'arta',
  'ascetic',
  'atelier-cave-dark',
  'atelier-cave-light',
  'atelier-dune-dark',
  'atelier-dune-light',
  'atelier-estuary-dark',
  'atelier-estuary-light',
  'atelier-forest-dark',
  'atelier-forest-light',
  'atelier-heath-dark',
  'atelier-heath-light',
  'atelier-lakeside-dark',
  'atelier-lakeside-light',
  'atelier-plateau-dark',
  'atelier-plateau-light',
  'atelier-savanna-dark',
  'atelier-savanna-light',
  'atelier-seaside-dark',
  'atelier-seaside-light',
  'atelier-sulphurpool-dark',
  'atelier-sulphurpool-light',
  'atom-one-dark',
  'atom-one-light',
  'brown-paper',
  'codepen-embed',
  'color-brewer',
  'darcula',
  'dark',
  'darkula',
  'default',
  'docco',
  'dracula',
  'far',
  'foundation',
  'github-gist',
  'github',
  'googlecode',
  'grayscale',
  'gruvbox-dark',
  'gruvbox-light',
  'hopscotch',
  'hybrid',
  'idea',
  'ir-black',
  'kimbie.dark',
  'kimbie.light',
  'magula',
  'mono-blue',
  'monokai-sublime',
  'monokai',
  'obsidian',
  'ocean',
  'paraiso-dark',
  'paraiso-light',
  'pojoaque',
  'purebasic',
  'qtcreator_dark',
  'qtcreator_light',
  'railscasts',
  'rainbow',
  'routeros',
  'school-book',
  'solarized-dark',
  'solarized-light',
  'sunburst',
  'tomorrow-night-blue',
  'tomorrow-night-bright',
  'tomorrow-night-eighties',
  'tomorrow-night',
  'tomorrow',
  'vs',
  'vs2015',
  'xcode',
  'xt256',
  'zenburn'
]

export const themeList = [
  'juejin-markdown',
  'github-markdown',
  'smart-blue-markdown',
  'devui-blue-markdown',
  'channing-cyan-markdown',
  'healer-readable-markdown',
  'qklhk-chocolate-markdown',
  'csdn-markdown',
  'tencent-markdown',
  'awesome-green-markdown',
  'cyanosis-markdown',
  'v-green-markdown',
  'condensed-night-purple-markdown',
  'mk-cute-markdown',
  'scrolls-markdown',
  'nico-markdown',
  'vuepress-markdown',
  'chinese-red-markdown',
  'fancy-markdown',
  'greenwillow-markdown',
  'z-blue-markdown',
  'minimalism-markdown'
]

export const EXPORT_ARTICLE_TYPES = [
  {
    img: require('~/assets/images/markdown.svg'),
    name: 'Markdown',
    suffix: '.md',
    suffixName: '.md'
  },
  {
    img: require('~/assets/images/pdf.svg'),
    name: 'PDF',
    suffix: '.pdf',
    suffixName: '.pdf'
  },
  {
    img: require('~/assets/images/word.svg'),
    name: 'Word',
    suffix: '.doc',
    suffixName: '.docx .doc'
  },
  {
    img: require('~/assets/images/jpg.svg'),
    name: 'JPG',
    suffix: '.jpg',
    suffixName: '.jpg'
  }
]

export const CIRCLE_BLOCKS = [
  { id: '1', name: '上班摸鱼' },
  { id: '2', name: '技术交流' },
  { id: '3', name: '新人报道' },
  { id: '4', name: '兴趣爱好' },
  { id: '5', name: '今日新鲜事' },
  { id: '6', name: '产品反馈 & 建议' },
  { id: '7', name: '书影专区' },
  { id: '8', name: '搞笑段子' },
  { id: '9', name: '许愿池' }
]

export const circleBlockMap = CIRCLE_BLOCKS.reduce((prev, cur) => {
  prev[cur.id] = cur.name
  return prev
}, {})
